package com.leemon.mall.common.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author limenglong
 * @create 2019-09-04 14:15
 * @desc mybatis plus配置
 **/
@Configuration
@EnableTransactionManagement
@MapperScan({"com.leemon.**.dao"})
public class MyBatisPlusConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
